#include "DeckGame.h"
#include "Player.h"
#include "Deck.h"
Deck* GetDeck()
{
	static Deck deck;
	return &deck;
}
void GameLoop()
{
	Player* player = new HumanPlayer;
	Player* computer = new ComputerPlayer;
	GetDeck()->SetPlayer(player, computer);
	while(!GetDeck()->HaveWinner())
	{
		{
			GetDeck()->ShowLife();
			
		}
		/*
		SelectHeroPack();
		SelectItem();
		SelectMainHero();
		Duel();		
		*/
		{
			player->SelectHeroPack();
			computer->SelectHeroPack();
			
		}
		
		
		{
			GetDeck()->ShowLife();
			GetDeck()->ShowHeroPack();
			player->SelectMainHero();
			computer->SelectMainHero();

		}

		{
			GetDeck()->ShowLife();
			player->SelectItem();
			computer->SelectItem();
			GetDeck()->ShowItem();
			
		}


		{
			//GetDeck()->ShowScore();
			GetDeck()->Duel();
			GetDeck()->ShowDuelResult();
			GetDeck()->Clear();
		}
	}

	GetDeck()->ShowLife();

	delete player;
	delete computer;
}
